home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tegl6b.zip / INTROPAK.EXE / lha / FRAME4.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-17  |  928b  |  35 lines

  1. {-- frame4.pas}
  2. {$F+}
  3.  
  4. USES teglunit,teglmain;
  5.  
  6. VAR ifs : ImageStkPtr;
  7.  
  8. function cancelevent(frame: ImageStkPtr; mouse: MsClickPtr): Word;
  9.   BEGIN
  10.     {-- this will press the button down and if the mouse button }
  11.     {-- is release WHILE it is over the button it will return }
  12.     {-- TRUE. If the mouse cursor passes out of the button without }
  13.     {-- being released then it will return FALSE and }
  14.     {-- releasesquarebutton will be called automatically. }
  15.     if visualsquarebuttonpress(frame,mouse) then
  16.       begin
  17.         {-- was TRUE, we release the button }
  18.         releasesquarebutton(frame,mouse);
  19.         {-- then dispose of the frame. }
  20.         dropstackimage(ifs);
  21.       end;
  22.   END;
  23.  
  24. BEGIN
  25.   easytegl;
  26.   easyout;
  27.   PushImage(50,50,200,150);
  28.   ShadowBox(50,50,200,150);
  29.   ifs := StackPtr;
  30.   DefineSquareButtonText(ifs,0,0,70,30,5,5,'CANCEL',cancelevent);
  31.   TeglSupervisor;
  32. END.
  33.  
  34.  
  35.